Text Utilities

Introduction

The Text Utilities provide you with an integrated collection of routines for performing a variety of operations on textual information, ranging from modifying the contents of a string, to sorting strings from different languages, to converting times, dates, and numbers from internal representations to formatted strings and back. These routines work in conjunction with QuickDraw text drawing routines to help you display and modify text in applications that are distributed to an international audience.

The Text Utilities functions are used for numerous text-handling tasks, including

• defining strings–including functions for allocating strings in the heap and for loading strings from resources

• comparing and sorting strings–including functions for testing whether two strings are equal and functions for finding the sorting relationship between two strings

• modifying the contents of strings–including routines for converting the case of characters, stripping diacritical marks, replacing substrings, and truncating strings

• finding breaks and boundaries in text–including routines for finding word and line breaks, and for finding different script runs in a line of text

• converting and formatting date and time strings–including routines that convert numeric and string representations of dates and times into record format, and routines that convert numeric and record representations of dates and times into strings

• converting and formatting numeric strings–including routines that convert string representations of numbers into numeric representations